<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>具名插槽</title>
</head>

<body>
    <div id=vueinside>
        <div-c>
            <slot name='slot1'></slot>
            <slot name='slot2'></slot>
            <slot>balabala</slot>
        </div-c>
    </div>
</body>
<script src="./js/vue.js"></script>
<script>
    Vue.component('divC', {
        template: `
        <div>
            <slot name='slot1'>slot1内容</slot>
            <template name='slot2'>
                <h1>内容2</h1>
                <h1>内容2</h1>
            </template>
            <p>普通插槽 默认内容</p>

        </div>
        `
    })
    var vueshili = new Vue({
        el: '#vueinside',
        data() {
            return {

            }
        },
    })
</script>

</html>